#pragma once

#include <XnUSB.h>
#include <cstdio>
#include <ctime>

/**
 * Classe per il controllo del motore del Kinect
 */
class KinectMotor {
public:
    KinectMotor();
    ~KinectMotor();

    /**
     * Apre il dispositivo.
     * @return true if succeeded, false - overwise
     */
    bool Open();

    /**
     * Close device.
     */
    void Close();

    /**
     * Move motor up or down to specified angle value.
     * @param angle angle value
     * @return true if succeeded, false - overwise
     */
    bool Move(int angle);

private:
    XN_USB_DEV_HANDLE m_dev;
    bool m_isOpen;
};